<nz-card>
  <sf #sf2 mode="search" [schema]="searchSchema" button="none"></sf>

  <div nz-row>
    <div nz-col nzSpan="24" style="text-align: right;padding-right: 5px;padding-bottom: 5px;">
      <button (click)="query()" nz-button nzType="primary"><i nz-icon nzType="search"></i>检索</button>
      <button (click)="this.sf2.reset()" nz-button nzType="default"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
      <button (click)="add()" nz-button nzType="primary"><i nz-icon nzType="plus"></i>功能新增</button>
    </div>
  </div> 
</nz-card>
<nz-card>
  <lb-grid #st  [columns]="columns"  [sname]="params.sname" [queryparas]="params.form">
    <ng-template lb-row="custom" let-item let-index="index">
      <nz-switch [ngModel]="item.AAE100=='1'"  (ngModelChange)="changeState(item)" ></nz-switch>
    </ng-template>
  </lb-grid>
</nz-card>


<!--弹出框放到最外面-->
<nz-modal [(nzVisible)]="isVisible" nzTitle="功能新增" (nzOnCancel)="handleCancel()" nzWidth="600">
  <div nz-row nzGutter="8">
    <div nz-col [nzSpan]="8">
        <nz-card>
          <nz-tree
          nzShowLine
        [nzData]="nodes"
        (nzClick)="nzEvent($event)"
        (nzExpandChange)="nzEvent($event)"
      >
      </nz-tree>
      </nz-card>
    </div>

   <div nz-col [nzSpan]="16">
    <nz-divider nzText="【功能信息录入】" nzOrientation="left" style="color:rgb(238, 85, 85);font-weight: bold;font-size: 13px;"></nz-divider>
      
      <sf #sf button="none"  [schema]="newSchema" [formData]="modiFormData"></sf>
    
   </div>
  
  </div>
  
  <div *nzModalFooter>
    <button nz-button nzType="default" (click)="handleCancel()">取消</button>
    <button nz-button nzType="primary" (click)="handleOkAdd()">确定</button>
  </div>
</nz-modal>


<nz-modal [(nzVisible)]="isUpVisible" nzTitle="功能修改" (nzOnCancel)="handleCancel()" nzWidth="500">
  <sf #sf1 button="none"  [schema]="updateSchema" [formData]="modiFormData"></sf>
  <div *nzModalFooter>
    <button nz-button nzType="default" (click)="handleCancel()">取消</button>
    <button nz-button nzType="primary" (click)="handleOkUp()" [nzLoading]="isConfirmLoading">确定</button>
  </div>
</nz-modal>

<nz-modal  [nzFooter]="modalFooter" [(nzVisible)]="isSqVisible" (nzOnCancel)="handleCancel()" nzTitle="功能授权">
  <nz-tree #tree
  [nzData]="gnsqNodes"
  nzCheckable
  nzMultiple
  nzCheckStrictly
  (nzClick)="gnEvent($event)"
  (nzExpandChange)="gnEvent($event)"
  (nzCheckBoxChange)="gnEvent($event)"
>
</nz-tree>

  <ng-template #modalFooter>
    <button nz-button nzType="default" (click)="handleCancel()">取消</button>
    <button nz-button nzType="primary" (click)="handleOk()" >授权</button>
  </ng-template>
</nz-modal>
